home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / awe2-0_1.lha / awe2-0.1 / Src / RCS / ThreadHeap.h,v < prev    next >
Text File  |  1989-02-23  |  1KB  |  111 lines

  1. head     3.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    grunwald:3.2; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 3.2
  10. date     89.02.20.15.37.55;  author grunwald;  state Exp;
  11. branches ;
  12. next     3.1;
  13.  
  14. 3.1
  15. date     88.12.20.13.50.28;  author grunwald;  state Exp;
  16. branches ;
  17. next     1.2;
  18.  
  19. 1.2
  20. date     88.10.30.13.06.16;  author grunwald;  state Exp;
  21. branches ;
  22. next     1.1;
  23.  
  24. 1.1
  25. date     88.09.18.16.42.16;  author grunwald;  state Exp;
  26. branches ;
  27. next     ;
  28.  
  29.  
  30. desc
  31. @@
  32.  
  33.  
  34. 3.2
  35. log
  36. @Start using Gnu library heaps for schedulers
  37. @
  38. text
  39. @// This may look like C code, but it is really -*- C++ -*-
  40. // 
  41. // Copyright (C) 1988 University of Illinois, Urbana, Illinois
  42. //
  43. // written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
  44. //
  45. #ifndef THREADHEAP
  46. #define THREADHEAP
  47.  
  48. #include "Thread.h"
  49.  
  50. #define HEAP_NAME ThreadHeap
  51.  
  52. class ThreadHeapItem {
  53.     Thread *ptr;
  54. public:
  55.     ThreadHeapItem();
  56.     ThreadHeapItem(Thread *p);
  57.     operator<=(ThreadHeapItem &p);
  58.     Thread *thread();
  59. };
  60.  
  61. inline Thread*
  62. ThreadHeapItem::thread()
  63. {
  64.     return(ptr);
  65. }
  66.  
  67. inline ThreadHeapItem::ThreadHeapItem()
  68. {
  69.     ptr = 0;
  70. }
  71.  
  72. inline ThreadHeapItem::ThreadHeapItem(Thread *p)
  73. {
  74.     ptr = p;
  75. }
  76.  
  77. inline int ThreadHeapItem::operator<=(ThreadHeapItem &p)
  78. {
  79.     return(ptr -> priority() <= (p.thread() -> priority()));
  80. }
  81.  
  82. #include "GenericHeap.h"
  83. #endif
  84.  
  85. @
  86.  
  87.  
  88. 3.1
  89. log
  90. @Steay version
  91. @
  92. text
  93. @@
  94.  
  95.  
  96. 1.2
  97. log
  98. @*** empty log message ***
  99. @
  100. text
  101. @@
  102.  
  103.  
  104. 1.1
  105. log
  106. @Initial revision
  107. @
  108. text
  109. @d1 6
  110. @
  111.